<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: include/mdf/imetadata.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_dea88a92c3ac1d8c329848683c200b71.html">mdf</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">imetadata.h</div></div>
</div><!--header-->
<div class="contents">
<a href="imetadata_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2022 Ingemar Hedvall</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * SPDX-License-Identifier: MIT</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> */</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &quot;<a class="code" href="etag_8h.html">mdf/etag.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &quot;<a class="code" href="iblock_8h.html">mdf/iblock.h</a>&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemdf.html">mdf</a> {</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="foldopen" id="foldopen00027" data-start="{" data-end="};">
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html">   27</a></span><span class="keyword">class </span><a class="code hl_class" href="classmdf_1_1_i_meta_data.html">IMetaData</a> : <span class="keyword">public</span> <a class="code hl_class" href="classmdf_1_1_i_block.html">IBlock</a> {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a149c5c7f67976bd281e881fb875d614f">   36</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a149c5c7f67976bd281e881fb875d614f">InitMd</a>(<span class="keyword">const</span> std::string&amp; root_name);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a59c95ea50527a58392fbc48c6f8fcbe6">   43</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a59c95ea50527a58392fbc48c6f8fcbe6">StringProperty</a>(<span class="keyword">const</span> std::string&amp; tag, <span class="keyword">const</span> std::string&amp; value);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#ae4c2f203274d3f4db7fa41fd816f66f8">   50</a></span>  [[nodiscard]] std::string <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#ae4c2f203274d3f4db7fa41fd816f66f8">StringProperty</a>(<span class="keyword">const</span> std::string&amp; tag) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a79db11490ed5d998b19466de41788223">   57</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a79db11490ed5d998b19466de41788223">FloatProperty</a>(<span class="keyword">const</span> std::string&amp; tag, <span class="keywordtype">double</span> value);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#af67017823fdbdfcdbe7d882f778d8cca">   64</a></span>  [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#af67017823fdbdfcdbe7d882f778d8cca">FloatProperty</a>(<span class="keyword">const</span> std::string&amp; tag) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a473066b0936b017de5d23729908db267">   70</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a473066b0936b017de5d23729908db267">CommonProperty</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_e_tag.html">ETag</a>&amp; e_tag);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a812d986fe30fbb12ebc4c9ab3cb7f268">   77</a></span>  [[nodiscard]] <a class="code hl_class" href="classmdf_1_1_e_tag.html">ETag</a> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a812d986fe30fbb12ebc4c9ab3cb7f268">CommonProperty</a>(<span class="keyword">const</span> std::string&amp; name) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a62365abdaa01813bb9cb05512a083acb">   83</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a62365abdaa01813bb9cb05512a083acb">CommonProperties</a>(<span class="keyword">const</span> std::vector&lt;ETag&gt;&amp; tag_list);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#aa26e799a55133f3b0508b412c0d3a9d0">   89</a></span>  [[nodiscard]] std::vector&lt;ETag&gt; <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#aa26e799a55133f3b0508b412c0d3a9d0">CommonProperties</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>  </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#acc1967554b6478f7920d6648c67e0062">   95</a></span>  [[nodiscard]] std::vector&lt;ETag&gt; <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#acc1967554b6478f7920d6648c67e0062">Properties</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>  </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a811452751aafc0d09ccd838fc7fe2fd6">  101</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a811452751aafc0d09ccd838fc7fe2fd6">XmlSnippet</a>(<span class="keyword">const</span> std::string&amp; text) = 0;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="classmdf_1_1_i_meta_data.html#a6cf79803061f65957c52f6f241dc957c">  107</a></span>  [[nodiscard]] <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code hl_function" href="classmdf_1_1_i_meta_data.html#a6cf79803061f65957c52f6f241dc957c">XmlSnippet</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>};</div>
</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>}  <span class="comment">// namespace mdf</span></div>
<div class="ttc" id="aclassmdf_1_1_e_tag_html"><div class="ttname"><a href="classmdf_1_1_e_tag.html">mdf::ETag</a></div><div class="ttdoc">Helper class for meta data items in an MDF file.</div><div class="ttdef"><b>Definition</b> etag.h:51</div></div>
<div class="ttc" id="aclassmdf_1_1_i_block_html"><div class="ttname"><a href="classmdf_1_1_i_block.html">mdf::IBlock</a></div><div class="ttdoc">Base class for all MDF blocks.</div><div class="ttdef"><b>Definition</b> iblock.h:19</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html">mdf::IMetaData</a></div><div class="ttdoc">Interface against an meta data block (MD) in a MDF4 file.</div><div class="ttdef"><b>Definition</b> imetadata.h:27</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a149c5c7f67976bd281e881fb875d614f"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a149c5c7f67976bd281e881fb875d614f">mdf::IMetaData::InitMd</a></div><div class="ttdeci">void InitMd(const std::string &amp;root_name)</div><div class="ttdoc">Initiate the MD block.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a473066b0936b017de5d23729908db267"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a473066b0936b017de5d23729908db267">mdf::IMetaData::CommonProperty</a></div><div class="ttdeci">void CommonProperty(const ETag &amp;e_tag)</div><div class="ttdoc">Sets a common property.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a59c95ea50527a58392fbc48c6f8fcbe6"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a59c95ea50527a58392fbc48c6f8fcbe6">mdf::IMetaData::StringProperty</a></div><div class="ttdeci">void StringProperty(const std::string &amp;tag, const std::string &amp;value)</div><div class="ttdoc">Sets a string property in the block.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a62365abdaa01813bb9cb05512a083acb"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a62365abdaa01813bb9cb05512a083acb">mdf::IMetaData::CommonProperties</a></div><div class="ttdeci">void CommonProperties(const std::vector&lt; ETag &gt; &amp;tag_list)</div><div class="ttdoc">Sets a number of common properties.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a6cf79803061f65957c52f6f241dc957c"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a6cf79803061f65957c52f6f241dc957c">mdf::IMetaData::XmlSnippet</a></div><div class="ttdeci">virtual const std::string &amp; XmlSnippet() const =0</div><div class="ttdoc">Returns the XML string.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a79db11490ed5d998b19466de41788223"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a79db11490ed5d998b19466de41788223">mdf::IMetaData::FloatProperty</a></div><div class="ttdeci">void FloatProperty(const std::string &amp;tag, double value)</div><div class="ttdoc">Sets a float property in the block.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a811452751aafc0d09ccd838fc7fe2fd6"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a811452751aafc0d09ccd838fc7fe2fd6">mdf::IMetaData::XmlSnippet</a></div><div class="ttdeci">virtual void XmlSnippet(const std::string &amp;text)=0</div><div class="ttdoc">Stores the XML as a string..</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_a812d986fe30fbb12ebc4c9ab3cb7f268"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#a812d986fe30fbb12ebc4c9ab3cb7f268">mdf::IMetaData::CommonProperty</a></div><div class="ttdeci">ETag CommonProperty(const std::string &amp;name) const</div><div class="ttdoc">Return a common property.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_aa26e799a55133f3b0508b412c0d3a9d0"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#aa26e799a55133f3b0508b412c0d3a9d0">mdf::IMetaData::CommonProperties</a></div><div class="ttdeci">std::vector&lt; ETag &gt; CommonProperties() const</div><div class="ttdoc">Returns all common properties.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_acc1967554b6478f7920d6648c67e0062"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#acc1967554b6478f7920d6648c67e0062">mdf::IMetaData::Properties</a></div><div class="ttdeci">std::vector&lt; ETag &gt; Properties() const</div><div class="ttdoc">Returns all properties without children.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_ae4c2f203274d3f4db7fa41fd816f66f8"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#ae4c2f203274d3f4db7fa41fd816f66f8">mdf::IMetaData::StringProperty</a></div><div class="ttdeci">std::string StringProperty(const std::string &amp;tag) const</div><div class="ttdoc">Returns a specific tag value.</div></div>
<div class="ttc" id="aclassmdf_1_1_i_meta_data_html_af67017823fdbdfcdbe7d882f778d8cca"><div class="ttname"><a href="classmdf_1_1_i_meta_data.html#af67017823fdbdfcdbe7d882f778d8cca">mdf::IMetaData::FloatProperty</a></div><div class="ttdeci">double FloatProperty(const std::string &amp;tag) const</div><div class="ttdoc">Returns a specific tag value.</div></div>
<div class="ttc" id="aetag_8h_html"><div class="ttname"><a href="etag_8h.html">etag.h</a></div><div class="ttdoc">Simple wrapper around meta data items.</div></div>
<div class="ttc" id="aiblock_8h_html"><div class="ttname"><a href="iblock_8h.html">iblock.h</a></div><div class="ttdoc">All MDF blocks inherits from the IBlock class. The interface class is used internally in lists....</div></div>
<div class="ttc" id="anamespacemdf_html"><div class="ttname"><a href="namespacemdf.html">mdf</a></div><div class="ttdoc">Main namespace for the MDF library.</div><div class="ttdef"><b>Definition</b> canmessage.h:17</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
